<?php
namespace app\scodetrace\model;

use \think\Model;
/*
	批次模型
*/
class Prize extends \app\common\model\Base{
	protected $table='xl_prize';
	// protected $visible=['name'];

  protected $append=['group'];
	public function activity(){
		return $this->belongsTo("Activity");
	}

  protected function getGroupAttr($value,$data) {
    return $this->group()->value('name');
  }
  protected function group() {
    return $this->belongsTo('\\app\\baseinfo\\model\\Group','group_id');
  }
	// public function logs(){
	// 	return $this->hasMany("\\app\\baseinfo\\model\\ProductLog",'batch_id');
	// }
}
?>